package com.top4create.dao.hibernate;

import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.top4create.dao.CompanyDao;
import com.top4create.model.Company;
import com.top4create.model.User;

@Repository("companyDao")
public class CompanyDaoHibernate extends GenericDaoHibernate<Company, Long>
		implements CompanyDao {
	public CompanyDaoHibernate() {
		super(Company.class);
	}

	public List<Company> getAll() {
		return getHibernateTemplate().find(
				"from Company c order by upper(c.username)");
	}

	public Company getCompanyById(Long id) {

		return get(id);
	}

	public Company updateCompanyInfo(Company company) {
		// TODO Auto-generated method stub
		return save(company);
	}

}
